package com.sdry.entity.approval;

import java.util.Date;

public class Approval  implements Comparable<Approval> {
	
	/**审批id*/
    private Long approvalid;

    /**提交人*/
    private String applicant;

    /**提交时间*/
    private Date approvaltime;

    /**结束时间*/
    private Date finishtime;

    /**审批状态*/
    private String status01;

    /**审批部门（审批人）顺序*/
    private String status02;

    /**审批文件类型*/
    private String status03;

    /**一级审批意见*/
    private String approver01;
    /**二级审批意见*/
    private String approver02;
    /**三级审批意见*/
    private String approver03;
    /**四级审批意见*/
    private String approver04;

    /**一级审批时间*/
    private String remark01;
    /**二级审批时间*/
    private String remark02;
    /**三级审批时间*/
    private String remark03;
    /**四级审批时间*/
    private String remark04;

    /**审批人*/
    private String remark05;
    
    /**附件信息路径*/
    private String remark06;
    
    /**审批是部门还是人  1：人*/
    private String types;

    public String getTypes() {
		return types;
	}

	public void setTypes(String types) {
		this.types = types;
	}

	public Long getApprovalid() {
        return approvalid;
    }

    public void setApprovalid(Long approvalid) {
        this.approvalid = approvalid;
    }

    public String getApplicant() {
        return applicant;
    }

    public void setApplicant(String applicant) {
        this.applicant = applicant == null ? null : applicant.trim();
    }

    public Date getApprovaltime() {
        return approvaltime;
    }

    public void setApprovaltime(Date approvaltime) {
        this.approvaltime = approvaltime;
    }

    public Date getFinishtime() {
        return finishtime;
    }

    public void setFinishtime(Date finishtime) {
        this.finishtime = finishtime;
    }

    public String getStatus01() {
        return status01;
    }

    public void setStatus01(String status01) {
        this.status01 = status01 == null ? null : status01.trim();
    }

    public String getStatus02() {
        return status02;
    }

    public void setStatus02(String status02) {
        this.status02 = status02 == null ? null : status02.trim();
    }

    public String getStatus03() {
        return status03;
    }

    public void setStatus03(String status03) {
        this.status03 = status03 == null ? null : status03.trim();
    }

    public String getApprover01() {
        return approver01;
    }

    public void setApprover01(String approver01) {
        this.approver01 = approver01 == null ? null : approver01.trim();
    }

    public String getApprover02() {
        return approver02;
    }

    public void setApprover02(String approver02) {
        this.approver02 = approver02 == null ? null : approver02.trim();
    }

    public String getApprover03() {
        return approver03;
    }

    public void setApprover03(String approver03) {
        this.approver03 = approver03 == null ? null : approver03.trim();
    }

    public String getApprover04() {
        return approver04;
    }

    public void setApprover04(String approver04) {
        this.approver04 = approver04 == null ? null : approver04.trim();
    }

    public String getRemark01() {
        return remark01;
    }

    public void setRemark01(String remark01) {
        this.remark01 = remark01 == null ? null : remark01.trim();
    }

    public String getRemark02() {
        return remark02;
    }

    public void setRemark02(String remark02) {
        this.remark02 = remark02 == null ? null : remark02.trim();
    }

    public String getRemark03() {
        return remark03;
    }

    public void setRemark03(String remark03) {
        this.remark03 = remark03 == null ? null : remark03.trim();
    }

    public String getRemark04() {
        return remark04;
    }

    public void setRemark04(String remark04) {
        this.remark04 = remark04 == null ? null : remark04.trim();
    }

    public String getRemark05() {
        return remark05;
    }

    public void setRemark05(String remark05) {
        this.remark05 = remark05 == null ? null : remark05.trim();
    }

	public String getRemark06() {
		return remark06;
	}

	public void setRemark06(String remark06) {
		this.remark06 = remark06;
	}

	@Override
	public int compareTo(Approval o) {
		 int i = (int) ( o.getApprovaltime().getTime() - this.approvaltime.getTime());//先按照日期排序  
	        if(i == 0){  
	            return (int) (o.getApprovalid() - this.approvalid);//如果日期相等了再用id进行排序  
	        }  
	        return i; 
	}
    
}